package cz.tpj.database.obrazky;

import static org.junit.Assert.*;

import org.junit.Test;

import cz.tpj.util.ErrorDatabase;

public class ObrazokTest {

	@Test
	public void testObrazokStringString() {
		Obrazok o1 = new Obrazok("1","c:\\pic.bmp");
		
		assertEquals("1", o1.getId());
		assertEquals("c:\\pic.bmp", o1.getCesta());
	}

	@Test
	public void testId() {
		Obrazok o1 = new Obrazok();
		
		try {
			o1.setId("1");
		} catch (ErrorDatabase e) {
			e.printStackTrace();
		}
		
		assertEquals("1", o1.getId());
	}

	@Test
	public void testCesta() {
		Obrazok o1 = new Obrazok();
		
		try {
			o1.setCesta("d:\\pic.bmp");
		} catch (ErrorDatabase e) {
			e.printStackTrace();
		}
		
		assertEquals("d:\\pic.bmp", o1.getCesta());
	}

}
